import React from 'react'
import TabBar from "../tabbar"
import { useLocation } from 'umi'
import "./index.less"
export default function index(props: any) {
    let location = useLocation();
    let paths = ["/", "/order", "/user"]
    return (
        <div style={{
            backgroundColor: "#DDDDDD",
            width: "100vw",
            height: "100vh"
        }}>
            <TabBar
                show={paths.includes(location.pathname)}
                pathname={location.pathname}
            ></TabBar>
            {props.children}
        </div>
    )
}
